package hansot.to;

public class CommentTO {
	private int commentId;
	private String writer;
	private String commentDate;
	private String commentContent;
	private String menuId;
	
	public CommentTO() {}
	
	public CommentTO(int commentId, String writer, String commentDate,
			String commentContent, String menuId) {
		this.commentId = commentId;
		this.writer = writer;
		this.commentDate = commentDate;
		this.commentContent = commentContent;
		this.menuId = menuId;
	}

	public int getCommentId() {
		return commentId;
	}
	public void setCommentId(int commentId) {
		this.commentId = commentId;
	}
	public String getWriter() {
		return writer;
	}
	public void setWriter(String writer) {
		this.writer = writer;
	}
	public String getCommentDate() {
		return commentDate;
	}
	public void setCommentDate(String commentDate) {
		this.commentDate = commentDate;
	}
	public String getCommentContent() {
		return commentContent;
	}
	public void setCommentContent(String commentContent) {
		this.commentContent = commentContent;
	}
	public String getMenuId() {
		return menuId;
	}
	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	@Override
	public String toString() {
		return "CommentTO [commentId=" + commentId + ", writer=" + writer
				+ ", commentDate=" + commentDate + ", commentContent="
				+ commentContent + ", menuId=" + menuId + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((commentContent == null) ? 0 : commentContent.hashCode());
		result = prime * result
				+ ((commentDate == null) ? 0 : commentDate.hashCode());
		result = prime * result + commentId;
		result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());
		result = prime * result + ((writer == null) ? 0 : writer.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CommentTO other = (CommentTO) obj;
		if (commentContent == null) {
			if (other.commentContent != null)
				return false;
		} else if (!commentContent.equals(other.commentContent))
			return false;
		if (commentDate == null) {
			if (other.commentDate != null)
				return false;
		} else if (!commentDate.equals(other.commentDate))
			return false;
		if (commentId != other.commentId)
			return false;
		if (menuId == null) {
			if (other.menuId != null)
				return false;
		} else if (!menuId.equals(other.menuId))
			return false;
		if (writer == null) {
			if (other.writer != null)
				return false;
		} else if (!writer.equals(other.writer))
			return false;
		return true;
	}
	
}
